const app = getApp()

Page({

  data: {
    loading: 1 
  },
  onLoad: function(options) {
    console.log(options)
    let type = options.type,
      name = options.name,
      id = options.id
    this.setData({
      name: name
    })
    let url 
    if (["1", "2"].indexOf(type) != -1) {
       url = app.baseUrl + '/WeChat/AttendanceSys/getAllSinInInfoByTeacher'
    }else{
      url = app.baseUrl + '/WeChat/AttendanceSys/getAllSinInInfoByTeacherNoMemberList'
    }
      wx.request({
        url: url,
        method: 'POST',
        data: {
          meetingId: id
        },
        dataType: 'json',
        success: (res) => {
          console.log(res)
          this.setData({
            meetingInfo: res.data
          })
        },
        complete: () => {
          this.setData({
            loading: 0
          })
        }
      })
    


  },

})